declare function push(array: any[], element: any)

class Elephant {
}

class Fridge {
    status: string
    elephants: Elephant[] = []
}

function open(fridge: Fridge) {
    fridge.status = "opened"
}

function put(fridge: Fridge, elephant: Elephant) {
    push(fridge.elephants, elephant) // 底层数组 push 方法。
}

function close(fridge: Fridge) {
    fridge.status = "closed"
}

function main() {
    const fridge = new Fridge()
    const elephant = new Elephant()
    open(fridge)
    put(fridge, elephant)
    close(fridge)
}

